import { request, pureAxios } from '@/utils/request'

export function login(parameter) {
  return request({
    url: '/auth/login',
    method: 'post',
    data: parameter
  })
}

export function imgcode() {
  return pureAxios({
    url: '/code',
    method: 'get',
    responseType: 'blob'
  })
}

export function getInfo(token) {
  return request({
    url: '/system/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
